//
//  JHXMPPManager.h
//  JHChat
//
//  Created by JiaHao on 2/22/15.
//  Copyright (c) 2015 JiaHao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPFramework.h"
#import "XMPPReconnect.h"
#import "XMPPRosterCoreDataStorage.h"
#import "XMPPvCardCoreDataStorage.h"
#import "XMPPCapabilitiesCoreDataStorage.h"
#import <XMPPMessageArchiving.h>
#import <XMPPMessageArchivingCoreDataStorage.h>

@interface JHXMPPManager : NSObject

+ (instancetype)sharedManager;

@property (strong,nonatomic) XMPPStream *xmppStream;
@property (strong,nonatomic) XMPPReconnect *xmppReconnect;
@property (strong,nonatomic) XMPPMessageArchivingCoreDataStorage *xmppMessageArchivingCoreDataStorage;
@property (strong,nonatomic) XMPPMessageArchiving *xmppMessageArchiving;
@property (strong,nonatomic) XMPPRosterCoreDataStorage *xmppRosterStorage;
@property (strong,nonatomic) XMPPRoster *xmppRoster;
@property (nonatomic, strong, readonly) XMPPvCardCoreDataStorage *xmppvCardStorage;
@property (nonatomic, strong, readonly) XMPPvCardTempModule *xmppvCardTempModule;
@property (nonatomic, strong, readonly) XMPPvCardAvatarModule *xmppvCardAvatarModule;
@property (nonatomic, strong, readonly) XMPPCapabilities *xmppCapabilities;
@property (nonatomic, strong, readonly) XMPPCapabilitiesCoreDataStorage *xmppCapabilitiesStorage;


@property (nonatomic, strong) XMPPJID *myJID;
@property (nonatomic, strong) XMPPJID *currentTalkJid;

@property (nonatomic, strong) NSString *myStreamBareJidStr;

-(void)setUpXmpp;

- (NSManagedObjectContext *)managedObjectContext_roster;
- (NSManagedObjectContext *)managedObjectContext_capabilities;
- (NSManagedObjectContext *)managedObjectContext_messageArchiving;

@end
